package main

import (
	"os"
	"path/filepath"

	exceltojson "gitee.com/honty/excel2json/excelTojson"
)

func main() {

	fileDir := "./excel/"
	fileExt := ".xlsx"
	filepath.Walk(fileDir, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		if !info.IsDir() && filepath.Ext(path) == fileExt {
			fileName := info.Name()
			fileName = fileName[:len(fileName)-len(fileExt)]
			exceltojson.Exceltojson(path, fileName)
		}
		return nil
	})
}
